package cn.zwx.member.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author zhangwenxue
 */
@Data
public class MemberRegisterDTO {


    @RequestParam(value = "手机号",required = true)
    @NotBlank(message = "手机号")
    private String mobile;

    @RequestParam(value = "密码",required = true)
    @NotBlank(message = "密码不能为空")
    @Pattern(regexp = "^(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9]{6,18}$",message = "必须包含大小写字母和数字的组合,长度在6-18之间")
    private String password;

    @RequestParam(value = "来源",required = true)
    @NotBlank(message = "来源")
    private String source;
}
